// Custom Mixins
/* Mixin to change input field design to specific color */
@mixin input-placeholder-color($txtcolor, $bgcolor: transparent) {
  ::-webkit-input-placeholder {
    /* Edge */
    background-color: $bgcolor;
    color: $txtcolor;
  }

  :-ms-input-placeholder {
    /* Internet Explorer 10-11 */
    background-color: $bgcolor;
    color: $txtcolor;
  }

  ::placeholder {
    color: $txtcolor;
    background-color: $bgcolor;
  }
}

/* Global Styles */

.main > .content {
  background-color: $app-bg-color;
}

// Horizontal Line
hr {
  border-width: 2px;
  border-color: $app-input-color;
}

// Tables
.table-striped.table-hover {
  thead {
    background-color: $app-input-color;

    th {
      color: $black;
    }
  }

  tbody {
    tr:nth-child(2n + 1) {
      background-color: transparent;
    }

    tr:hover {
      background-color: $app-bg-color;
    }
  }
}

// Forms - checkbox
.checkbox-container {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  position: relative;
  display: block;
  width: 25px;
  height: 25px;

  input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
  }

  /* Create a custom checkbox */
  .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: $white;
    border: 1px solid $primary;
    border-radius: 3px;
  }

  /* On mouse-over, add a grey background color */
  &:hover input ~ .checkmark {
    background-color: #ccc;
  }

  /* When the checkbox is checked, add a blue background */
  input:checked ~ .checkmark {
    background-color: #2196f3;
  }

  /* Create the checkmark/indicator (hidden when not checked) */
  .checkmark:after {
    content: "";
    position: absolute;
    display: none;
  }

  /* Show the checkmark when checked */
  input:checked ~ .checkmark:after {
    display: block;
  }

  /* Style the checkmark/indicator */
  .checkmark:after {
    left: 8px;
    top: 3px;
    width: 10px;
    height: 15px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
  }
}
.radio-container {
  display: block;
  position: relative;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
  }

  .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 50%;
  }

  &:hover input ~ .checkmark {
    background-color: #ccc;
  }

  input:checked ~ .checkmark {
    background-color: #2196f3;
  }
  .checkmark:after {
    content: "";
    position: absolute;
    display: none;
  }
  input:checked ~ .checkmark:after {
    display: block;
  }
  .checkmark:after {
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
  }
}

// Tabs

.bloc-Mytabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  border-bottom: 1px solid $gray-300;

  button {
    background-color: transparent;
    padding: 0.3rem 0;
    position: relative;
    transition: $transition-base;
    margin: 0 1.5rem 0rem 0;

    &:after {
      content: "";
      transition: $transition-appearance;
      display: block;
      position: absolute;
      bottom: 0px;
      left: 0;
      // transform: translateX(-50%);
      width: 50%;
      height: 3px;
      background: transparent;
    }

    &:focus {
      outline: none;
    }
  }

  button.active-Mytabs {
    font-weight: $font-weight-bold;

    &:after {
      background: $dark;
    }
  }

  button:hover {
    &:after {
      background-color: rgba($primary, 0.8);
    }
  }
}

/*
--------------------------------------
        AUTHBOX
--------------------------------------
*/
.auth-box {
  background-color: #F0DEC6;

  .row {
    div:first-child {
      .card {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;

        // input placeholder colour change
        @include input-placeholder-color($txtcolor: $black);

        input,
        select {
          background-color: $app-input-color;
          color: $black;
        }
      }
    }

    div:last-child {
      .card {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;

        @include input-placeholder-color($black);
      }
    }
  }

  .signup-card,
  .login-card {
    min-height: 450px;
  }
}

/*
--------------------------------------
        Sidebar
--------------------------------------
*/
.sidebar-item.active {
  .sidebar-link {
    border-left: 5px solid #00995E;
    background-color: rgba($primary, 0.3);
  }
  .sidebar-link:hover {
    background: #00995e33;
  }

  .sidebar-dropdown {
    .sidebar-link {
      border-color: transparent;
    }
  }
}

/*
--------------------------------------
        Assessments / Shop
--------------------------------------
*/
.assessment-course-cat {
  background-color: rgba($app-course-bg, 0.15);
  padding: 15px;
  .card-header {
    background-color: transparent;
  }

  img {
    height: 80px;
    width: 80px;
  }

  h3 {
    font-weight: 400;
  }
}
.shop-assessment-card {
  padding: 8px;

  img {
    height: 80px;
    width: 80px;
  }

  h3 {
    font-weight: 400;
  }

  hr {
    margin: 0;
  }
}

.assessment-wrapper-home {
  .form-check {
    padding: 1rem 1rem 1rem 2.5rem;
    background-color: $gray-300;
    margin-bottom: 1rem;

    label {
      display: block;
      position: relative;
      padding-left: 35px;
      margin-bottom: 12px;
      cursor: pointer;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;

      /* Hide the browser's default radio button */
      input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
      }

      /* On mouse-over, add a grey background color */
      &:hover input ~ .checkmark {
        background-color: $primary;
      }

      /* When the radio button is checked, add a blue background */
      input:checked ~ .checkmark {
        background-color: $primary;
      }

      /* Show the indicator (dot/circle) when checked */
      input:checked ~ .checkmark:after {
        display: block;
      }

      /* Style the indicator (dot/circle) */
      .checkmark:after {
        top: 6px;
        left: 6px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: white;
      }
    }

    /* Create a custom radio button */
    .checkmark {
      position: absolute;
      top: 0;
      left: 0;
      height: 25px;
      width: 25px;
      background-color: $white;
      border-radius: 50%;
      border: 3px solid $primary;
    }

    /* Create the indicator (the dot/circle - hidden when not checked) */
    .checkmark:after {
      content: "";
      position: absolute;
      display: none;
    }
  }

  table {
    font-size: 1rem;

    thead {
      background-color: $gray-300;

      th {
        border: 0;
        color: $black;
        text-align: center;

        &:first-child {
          text-align: left;
        }
      }
    }

    tbody {
      tr {
        td {
          text-align: center;

          &:first-child {
            text-align: left;
          }
        }
      }
    }
  }
}
.question-number {
  padding: 5px;
  background-color: $primary;
  width: 50px;
  height: 50px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.scrollable {
  max-width: 100%;
  overflow-x: scroll;
}

.SortButton {
  background-color: transparent;
  font-weight: $font-weight-bold;

  svg {
    margin-left: 0.5rem;
    > path {
      fill: $secondary;
    }
  }
}

.app-filters {
  label {
    display: none;
  }

  input[type="text"] {
    background-color: $app-input-color;
    color: $black;

    &::-webkit-input-placeholder {
      /* Edge */
      color: $black;
      font-weight: $font-weight-bold;
    }

    &:-ms-input-placeholder {
      /* Internet Explorer 10-11 */
      color: $black;
      font-weight: $font-weight-bold;
    }

    &::placeholder {
      color: $black;
      font-weight: $font-weight-bold;
    }
  }

  select {
    border: 2px solid $primary;
  }
}

.modal-content {
  .modal-header {
    padding-bottom: 0;
    .modal-title {
      color: $primary;
      font-weight: $font-weight-bold;
      @extend .h2;
    }
  }

  input[type="text"],
  input[type="password"],
  input[type="tel"],
  input[type="email"] {
    background-color: $app-input-color;
    color: $black;

    &::-webkit-input-placeholder {
      /* Edge */
      color: $black;
      font-weight: $font-weight-bold;
    }

    &:-ms-input-placeholder {
      /* Internet Explorer 10-11 */
      color: $black;
      font-weight: $font-weight-bold;
    }

    &::placeholder {
      color: $black;
      font-weight: $font-weight-bold;
    }
  }

  select {
    border: 2px solid $primary;
  }
  .modal-footer {
    .btn {
      @extend .col-6;
    }
  }
}

// Partner Logo Styles
.partner-logo {
  filter: brightness(0) invert(1);
}
